﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace UnityGameFramework.Editor.ResourceTools
{
    public sealed class Folder : IComparable<Folder>
    {
        private Folder(string path, Resource resource)
        {
            Path = path;
            Resource = resource;
        }


        public string Path { get; private set; }

        public Resource Resource { get; set; }

        public int CompareTo(Folder folder)
        {
            return string.Compare(Path, folder.Path, StringComparison.Ordinal);
        }

        public static Folder Create(string path)
        {
            return new Folder(path, null);
        }

        public static Folder Create(string path, Resource resource)
        {
            return new Folder(path, resource);
        }
    }
}
